#include "UDPServer.hpp"
#include <iostream>
#include <memory>

static void UserManual()
{
    std::cout << "please:./UDPServer port" << std::endl;
}

int main(int arc, char* argv[])
{
    if (arc != 2)
    {
        UserManual();
        exit(-1);
    }
    std::unique_ptr<UDPServer> UDPServer_ptr(new UDPServer(atoi(argv[1])));
    UDPServer_ptr->initserver();
    UDPServer_ptr->start();
    return 0;
}